
namespace UFrame
{
    public enum eNetState
    {
        NS_None = 1,
        NS_Connecting,
        NS_ConnectFailed,
        NS_ConnectSuccessed,
        NS_Working,
        NS_ConnectDropped,
        NS_AgaionConnect,

    }

    public enum eNetError
    {
        NE_None = 0,
        NE_ReadBufferOverflow,      // ���ݰ����Ȳ��Ϸ���������0���߳������������ȣ�
        NE_WriteBufferOverflow,     // ���ݰ����Ȳ��Ϸ���������0���߳������������ȣ�
        NE_OutOfWorking,            // �����޷�����
        NE_WriteException,          // ����д���쳣
    }

    public class NetDefine
    {
        public static int HEAD_LEN_SIZE = 4;                    // ��ͷ����
        public static int HEAD_OP_SIZE = 2;                     // ���Ʒ�����
        public static int BUFFER_LENGTH = 0x7FFFFF;             // ����������
    }

    public struct BufferInfo
    {
        public int nBufferSize;
        public int nReadSize;
    }

    public class NetTool
    {
        public static void Log(object message)
        {
            PLDebug.Log("LBNet - " + message);
        }

        public static void LogWarning(object message)
        {
            //            .LogWarning("LBNet - " + message);
        }

        public static void LogError(object message)
        {
            PLDebug.LogError("LBNet - " + message);
        }
    }

}
